<?php
require_once('facebook.php');
$facebook = new Facebook(array (
	'appId' => '397364003641814',
	'secret' =>  'c6983c1d2493b25488ced10aa57c9301',
	'cookie' => true
));
	
$url = $facebook->getLoginUrl();
/*
print '<a href="'.$url.'">Login!</a>';	
$public = $facebook->api('/100003795804780');
print_r($public);
*/
	
//TODO eids in denen der gewuenschte Ort drin. z.B. alle eid mit Wiesbaden
$fql = 'SELECT privacy,name, venue, location, start_time FROM event where eid = 226513557458367' ;
$fgl2 = 'SELECT venue.city,venue.street FROM event WHERE eid=226513557458367'; 
// venue gibt page_id zurueck - so wie es eingepfelgt wurde.
$fql3 = 'SELECT name, fan_count FROM page WHERE page_id = 110497988970354';
$param  =   array(
		'method' => 'fql.query',
		'query' => $fql3,
		'callback' => ''
);
$events = $facebook->api($param);
var_dump($events);
echo '<br />';
print_r($events);
echo "schluss";
echo '<br />';
echo $events[0]["venue"]['id'];
echo $events[0]["privacy"];
